<!--
 * @Descripttion: ---
 * @version: v1.0.0.0
 * @Author: 任飞
 * @Date: 2020-07-08 00:42:37
 * @LastEditors: 任飞
 * @LastEditTime: 2020-07-08 01:17:15
--> 
<template>
  <div class="wrap-detail">
    <el-form>
      <el-row :gutter="20">
        <el-col :span="5">
          <el-form-item label="订单号">{{ dataDetail.orderNo }}</el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="订单日期">{{ dataDetail.orderDate }}</el-form-item>
        </el-col>
         <el-col :span="5">
          <el-form-item label="团长">{{ dataDetail.promGroupResultDto.leaderNickName }}</el-form-item>
        </el-col>
         <el-col :span="5">
          <el-form-item label="订单金额">{{ dataDetail.orderAmt }}</el-form-item>
        </el-col>
      </el-row>
       <el-row :gutter="20">
         <el-col :span="5">
          <el-form-item label="购买人">{{ dataDetail.buylerName }}</el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="付款金额">{{ dataDetail.payAmt }}</el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="付款时间">{{ dataDetail.payTime }}</el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="退款金额">{{ dataDetail.refundAmt }}</el-form-item>
        </el-col>
      </el-row>
       <el-row :gutter="20">
       <el-col :span="5">
          <el-form-item label="收件人姓名">{{ dataDetail.orderShippingResultDto.recvName }}</el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="收件人手机号">{{ dataDetail.orderShippingResultDto.recvPhone }}</el-form-item>
        </el-col>
       <el-col :span="10">
          <el-form-item label="收件人地址">
          {{ dataDetail.orderShippingResultDto.recvProvince }}
          {{ dataDetail.orderShippingResultDto.recvCity }}
          {{ dataDetail.orderShippingResultDto.recvDistrict }}
          {{ dataDetail.orderShippingResultDto.recvAddress }}
          </el-form-item>
        </el-col>
      </el-row>
       <el-row :gutter="20">
         <el-col :span="5">
          <el-form-item label="订单状态">{{ dataDetail.orderStatusName }}</el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="物流公司">{{ dataDetail.orderShippingResultDto.shippingWay }}</el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="物流单号">{{ dataDetail.orderShippingResultDto.shippingNo }}</el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <el-table v-loading="loading" ref="multipleTable" :data="dataDetail.orderDetailResultDtoList" style="width: 100%" border fit highlight-current-row >
      <el-table-column prop="stockNo" label="产品编号" />
      <el-table-column prop="itemName" label="产品名称" />
      <el-table-column prop="costPrice" label="原始价格" />
      <el-table-column prop="price" label="团购价格" />
      <el-table-column prop="num" label="数量" />
      <el-table-column prop="amt" label="销售额" />
    </el-table>
  </div>
</template>
<script>
export default {
  props: {
    example: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {
      loading: true,
      dataDetail: {}
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {
    const id = this.$route.params.id
    this.getInitData(id)
  },
  methods: {
    getInitData(id) {
      this.$api.fenxiao.order.detail(id).then(res => {
        this.loading = false
        this.dataDetail = res.data
      }).catch(err => {

      })
    }
  }
}
</script>
<style lang='less' scoped>
.wrap-detail {
  padding: 20px 50px;
}
</style>